feat(platform): add lifecycle.Component and lifecycle.Group#402
Open
JamyDev wants to merge 1 commit into
Open
Conversation
JamyDev
added a commit
that referenced
this pull request
Jul 20, 2026
## Summary - Introduces `platform/pipeline` with the typed `Construct[D]` engine - `Stage[D]` struct declares pipeline topology as a typed table (key, name, consumer group, controller constructor, optional DLQ) - Engine builds topic registry, creates primary + DLQ consumers, eagerly constructs all controllers, pairs DLQ stages automatically - Returns a `lifecycle.Component` for ordered start/stop - Options: `TopicNames`, `Classifiers`, `PublishOnly`, `ExtraComponents` - Pure addition — no existing code changes Step 2 of the [Modular Queue Wiring RFC](https://github.com/uber/submitqueue/blob/main/doc/rfc/submitqueue/modular-queue-wiring.md). Stacked on #402. ## Test plan - [x] 10 unit tests: single stage, DLQ pairing, multiple stages, empty stages error, controller creation failure, DLQ creation failure, publish-only topics, topic name overrides, resolveTopicName table test, dlqTopicKey, buildTopicConfigs - [x] `bazel test //platform/pipeline:go_default_test` passes - [x] `make gazelle` — BUILD.bazel in sync - [x] `make fmt` — code formatted Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Jul 20, 2026
JamyDev
force-pushed
the
jamy/platform-lifecycle
branch
3 times, most recently
from
July 24, 2026 16:55
108f096 to
4b1e4de
Compare
JamyDev
marked this pull request as ready for review
July 24, 2026 17:31
JamyDev
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
July 24, 2026 17:31
JamyDev
force-pushed
the
jamy/platform-lifecycle
branch
from
July 24, 2026 18:09
4b1e4de to
e52af1b
Compare
Introduce `platform/lifecycle` with two exports: - `Component` interface: `Start(ctx) error`, `Stop(ctx) error` — the one lifecycle abstraction every runnable subsystem implements. - `Group`: runs an ordered list of Components as one Component. Start proceeds in order with rollback on partial failure (no half-started state). Stop proceeds in reverse order, joining all errors so none is swallowed. Pure addition — no existing code changes. Ref: doc/rfc/submitqueue/modular-queue-wiring.md (Step 1) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JamyDev
force-pushed
the
jamy/platform-lifecycle
branch
from
July 24, 2026 18:57
c6f63b9 to
706b856
Compare
JamyDev
added a commit
that referenced
this pull request
Jul 24, 2026
## Summary - Introduces `platform/pipeline` with the typed `Construct[D]` engine - `Stage[D]` struct declares pipeline topology as a typed table (key, name, consumer group, controller constructor, optional DLQ) - Engine builds topic registry, creates primary + DLQ consumers, eagerly constructs all controllers, pairs DLQ stages automatically - Returns a `lifecycle.Component` for ordered start/stop - Options: `TopicNames`, `Classifiers`, `PublishOnly`, `ExtraComponents` - Pure addition — no existing code changes Step 2 of the [Modular Queue Wiring RFC](https://github.com/uber/submitqueue/blob/main/doc/rfc/submitqueue/modular-queue-wiring.md). Stacked on #402. ## Test plan - [x] 10 unit tests: single stage, DLQ pairing, multiple stages, empty stages error, controller creation failure, DLQ creation failure, publish-only topics, topic name overrides, resolveTopicName table test, dlqTopicKey, buildTopicConfigs - [x] `bazel test //platform/pipeline:go_default_test` passes - [x] `make gazelle` — BUILD.bazel in sync - [x] `make fmt` — code formatted Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
behinddwalls
approved these changes
Jul 24, 2026
| // managing ordered start/stop lifecycles. Every runnable subsystem (consumer, | ||
| // publisher, server) implements Component; Group composes them into a single | ||
| // Component with deterministic ordering and rollback on partial failure. | ||
| package lifecycle |
Collaborator
There was a problem hiding this comment.
wondering if all these be just in a single package maybe "wiring" or something else...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Step 1 of the Modular Queue Wiring RFC.
Test plan
Stack
Test Plan
Net new, Unit Tests added
Issues
https://linear.app/uber/issue/CODEM-209/example-figure-out-a-better-structure-for-wiring-up